﻿<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>领取优惠券</title>
<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta content="telephone=no" name="format-detection">
<link href="/carworld_weixin/css/bootstrap.min.css" rel="stylesheet">
<link href="/carworld_weixin/css/received_card_style.css" rel="stylesheet" type="text/css">
<script src="/carworld_weixin/js/jquery-3.3.1.min.js"></script>
<script src="/carworld_weixin/js/bootstrap.min.js"></script>
<script type="text/javascript">
	$(function() {
		$(".aui-head-title").click(function() {
			$(this).toggleClass("aui-current-up").siblings(".aui-head-title").removeClass("aui-current-up");
			$(this).toggleClass("aui-current-tx").siblings(".aui-head-title").removeClass("aui-current-tx");
			$(this).next(".aui-box-content").slideToggle(100).siblings(".aui-box-content").slideUp(400);
		})
	})
</script>
<style type="text/css">
.tb960x90 {
	display: none !important;
	display: none
}
</style>
</head>
<body>
	<section class="aui-flexView">
		<section class="aui-scrollView">
			<div class="aui-show-content">
				<div>
					<img src="/carworld_weixin/images/activity/logo.jpg" alt="" style="width: 100%; height: 220px;">
				</div>
				<!--<div class="aui-show-user">-->
					<!--<img src="" alt="" id="sharer_photo">-->
				<!--</div>-->
			</div>
			<div class="aui-show-head">
				<div>
					来自
					<span id="sharer_name"></span>
					分享的优惠券
				</div>
			</div>
			<div class="aui-show-button b-line">
				<a href="javascript:;" onclick="isShowQr()" id="receivedCoupon">立即领取</a>
			</div>
			<div class="aui-flex b-line">
				<div class="aui-show-doctor">
					<i class="icon icon-doctor"></i>
					套餐内容：
					<span style="font-size: 16px;" id="meal_name"></span>
				</div>
			</div>
			<div class="aui-show-list b-line">
				<div class="aui-flex">
					<span style="font-size: 16px;">茉德精品火锅新客优惠说明：</span>
				</div>
				<div class="aui-head-title aui-current-up aui-current-tx"></div>
				<div class="aui-box-content" style="display: block;">
					<div class="aui-flex">
						<div class="aui-show-doctor">
							<i class="icon icon-vip"></i>
						</div>
						<div class="aui-flex-box">
							<span>一键领取无门槛优惠券，下单自动抵扣</span>
						</div>
					</div>
					<div class="aui-flex">
						<div class="aui-show-doctor">
							<i class="icon icon-vip"></i>
						</div>
						<div class="aui-flex-box">
							<span>优惠券每人仅限使用一次</span>
						</div>
					</div>
					<div class="aui-flex">
						<div class="aui-show-doctor">
							<i class="icon icon-vip"></i>
						</div>
						<div class="aui-flex-box">
							<span>优惠券有效2020年12月31日</span>
						</div>
					</div>
				</div>
			</div>
			<div class="aui-show-follow">
				<a href="javascript:;" class="">
					<b>132</b>
					个朋友领此优惠券
				</a>
				<a href="javascript:;" class="">
					<b>1256</b>
					位会员关注了此店
				</a>
			</div>
			<div class="divHeight"></div>
			<div class="aui-flex">
				<div class="aui-show-doctor">
					<i class="icon icon-vip"></i>
					地址
				</div>
				<div class="aui-flex-box"></div>
				<div class="aui-show-arrow" id="office_address"></div>
			</div>
			<div class="divHeight"></div>
		</section>
	</section>
	<!--弹出二维码关注 -->
	<div class="modal fade" id="showQr" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="myModalLabel">长按二维码关注后立即登录</h4>
				</div>
				<div class="modal-body" style="text-align: center">
					<img src="/carworld_weixin/images/modewiexin.jpg" />
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
				</div>
			</div>
			<!-- /.modal-content -->
		</div>
		<!-- /.modal -->
	</div>
	

	<script>
		var json = '${jsonObject}';
		var data = JSON.parse(json);
		// $('#sharer_photo').attr('src', data.sharerPhoto);
		$('#office_name').html(data.officeName);
		$('#sharer_name').html(data.sharerName);
		$('#meal_name').html(data.mealName);
		$('#office_address').html(data.officeAddress);

		if (data.state == 0 || data.state == -1) {
			alert(data.message);
			$('#receivedCoupon').remove();
		}
		
		function isShowQr() {
			alert(data.message);
			if (data.userIsFocus == 0) {
				$('#showQr').modal();
			}
			if(data.userIsFocus != 0){
				window.location.href = '/carworld_weixin/user/userPage';
			}
		}

	</script>
</body>
</html>
